package com.aaa.entity;

import javax.persistence.*;
import java.sql.Date;
import java.util.Objects;

@Entity
@Table(name = "student", schema = "trainingdb", catalog = "")
public class StudentEntity {
    private int stuid;
    private Integer classid;
    private String stuname;
    private String sex;
    private String wechat;
    private String qq;
    private String phone;
    private String patriarch;
    private String paPhone;
    private Date starttime;
    private String stutate;
    private String clazz;
    private String label;
    private String learning;
    private String idcard;
    private String reception;
    private String remark;

    public StudentEntity(int stuid, String stuname, String sex, String phone, String stutate, String remark) {
        this.stuid = stuid;
        this.stuname = stuname;
        this.sex = sex;
        this.phone = phone;
        this.stutate = stutate;
        this.remark = remark;
    }

    @Id
    @Column(name = "stuid")
    public int getStuid() {
        return stuid;
    }

    public void setStuid(int stuid) {
        this.stuid = stuid;
    }

    @Basic
    @Column(name = "classid")
    public Integer getClassid() {
        return classid;
    }

    public void setClassid(Integer classid) {
        this.classid = classid;
    }

    @Basic
    @Column(name = "stuname")
    public String getStuname() {
        return stuname;
    }

    public void setStuname(String stuname) {
        this.stuname = stuname;
    }

    @Basic
    @Column(name = "sex")
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Basic
    @Column(name = "wechat")
    public String getWechat() {
        return wechat;
    }

    public void setWechat(String wechat) {
        this.wechat = wechat;
    }

    @Basic
    @Column(name = "qq")
    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    @Basic
    @Column(name = "phone")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Basic
    @Column(name = "patriarch")
    public String getPatriarch() {
        return patriarch;
    }

    public void setPatriarch(String patriarch) {
        this.patriarch = patriarch;
    }

    @Basic
    @Column(name = "pa_phone")
    public String getPaPhone() {
        return paPhone;
    }

    public void setPaPhone(String paPhone) {
        this.paPhone = paPhone;
    }

    @Basic
    @Column(name = "starttime")
    public Date getStarttime() {
        return starttime;
    }

    public void setStarttime(Date starttime) {
        this.starttime = starttime;
    }

    @Basic
    @Column(name = "stutate")
    public String getStutate() {
        return stutate;
    }

    public void setStutate(String stutate) {
        this.stutate = stutate;
    }

    @Basic
    @Column(name = "class")
    public String getClazz() {
        return clazz;
    }

    public void setClazz(String clazz) {
        this.clazz = clazz;
    }

    @Basic
    @Column(name = "label")
    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    @Basic
    @Column(name = "learning")
    public String getLearning() {
        return learning;
    }

    public void setLearning(String learning) {
        this.learning = learning;
    }

    @Basic
    @Column(name = "idcard")
    public String getIdcard() {
        return idcard;
    }

    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }

    @Basic
    @Column(name = "reception")
    public String getReception() {
        return reception;
    }

    public void setReception(String reception) {
        this.reception = reception;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        StudentEntity that = (StudentEntity) o;
        return stuid == that.stuid &&
                Objects.equals(classid, that.classid) &&
                Objects.equals(stuname, that.stuname) &&
                Objects.equals(sex, that.sex) &&
                Objects.equals(wechat, that.wechat) &&
                Objects.equals(qq, that.qq) &&
                Objects.equals(phone, that.phone) &&
                Objects.equals(patriarch, that.patriarch) &&
                Objects.equals(paPhone, that.paPhone) &&
                Objects.equals(starttime, that.starttime) &&
                Objects.equals(stutate, that.stutate) &&
                Objects.equals(clazz, that.clazz) &&
                Objects.equals(label, that.label) &&
                Objects.equals(learning, that.learning) &&
                Objects.equals(idcard, that.idcard) &&
                Objects.equals(reception, that.reception) &&
                Objects.equals(remark, that.remark);
    }

    @Override
    public int hashCode() {
        return Objects.hash(stuid, classid, stuname, sex, wechat, qq, phone, patriarch, paPhone, starttime, stutate, clazz, label, learning, idcard, reception, remark);
    }
}
